//指针,引用直接修改值
package main

import "fmt"

func main() {
	var a = 10
	var b = 20
	fmt.Println(a, b)
	swap(&a, &b)
	fmt.Println(a, b)
}

func swap(a *int, b *int) {
	temp := *b
	*b = *a
	*a = temp
}
